﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true"
    CodeBehind="Brand_Add.aspx.cs" Inherits="TimKen.Web.Admin.Brand.Brand_Add" %>

<%@ Register TagPrefix="FCKeditorV2" Namespace="FredCK.FCKeditorV2" Assembly="FredCK.FCKeditorV2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentLinkAction" runat="server">
    <span class="action-span"><a href="Brand_List.aspx">
        <%=GetLangString("MenuBrandManage")%></span>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentTitle" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentMain" runat="server">
    <script type="text/javascript">
        function checkForm() {
            if (document.getElementById("<%=this.txtBrandName.ClientID%>").value == "") {
                alert('<%=GetLangString("x_BrandNameNotAllowBlank")%>');
                return false;
            }
            return true;
        }

        function Upload() {
            var sk, sf, sp, ss;
            sk = "/FileUploadMain.aspx?syn=DSC";
            sf = "dialogWidth=420px;dialogHeight=200px;center=yes;help=no;resizable:no;status:no";
            sp = ""; ss = "";
            ss = showModalDialog(sk, sp, sf);
            if (ss != null && ss != "") {
                document.getElementById("<%=this.txtLogo.ClientID%>").value = ss;
                document.getElementById("<%=this.btnRefresh.ClientID%>").click();
            }
        }
    </script>
    <div class="main-div">
        <table width="100%" id="general-table">
            <tr>
                <th class="label">
                    <%=GetLangString("BrandName")%>：
                </th>
                <td>
                    <asp:HiddenField ID="txtBrandID" runat="server" />
                    <asp:TextBox runat="server" ID="txtBrandName"></asp:TextBox>
                    <span class="require-field">*</span>
                </td>
            </tr>
            <tr>
                <th class="label">
                    品牌公司名：
                </th>
                <td>
                    <asp:TextBox runat="server" ID="txtCompanyName" Width="300px"></asp:TextBox>
                </td>
                
            </tr>
            <tr>
                <th class="label">
                    URL：
                </th>
                <td>
                    <asp:TextBox runat="server" ID="txtUrl" Width="300px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <th class="label">
                    Logo：
                </th>
                <td>
                    <asp:TextBox ID="txtLogo" runat="server" Width="150px" Style="display: none"></asp:TextBox>
                    <input type="button" onclick="Upload()" value="上传" id="btnUpload" runat="server" />
                    <asp:Button ID="btnDelete" Text="删除" runat="server" CausesValidation="false" OnClick="btnDelete_Click" /><br />
                    <asp:Image Width="200" Height="200" ID="imgLogoImage" runat="server" />
                    <asp:Button ID="btnRefresh" Text="" runat="server" CausesValidation="false" Style="display: none"
                        OnClick="btnRefresh_Click" />
                </td>
            </tr>
            <tr>
                <th class="label">
                    <%=GetLangString("Description")%>：
                </th>
                <td>
                    <FCKeditorV2:FCKeditor ID="fckDescription" runat="server" AutoDetectLanguage="false"
                        Height="400">
                    </FCKeditorV2:FCKeditor>
                </td>
            </tr>
            <tr>
                <th>
                </th>
                <td>
                </td>
                <asp:Button ID="btnSave" runat="server" Text="" OnClick="btnSave_Click" CssClass="button"
                    OnClientClick="return checkForm();" />
            </tr>
        </table>
    </div>
</asp:Content>
